<?php
ini_set("session.cookie_domain",'localhost.com');
session_start();
$_SESSION['user_name'] = 'bibibibi';
echo $_SESSION['user_name'];

function session(string $key, $value = array())
{
    if ($value !== null && empty($value))
    {
        return $_SESSION[$key] ?? "";
    }
    elseif ($value === null)
    {
        if (isset($_SESSION[$key]))
        {
            unset($_SESSION[$key]);
        }
    } else {
        $_SESSION[$key] = $value;
    }
    return null;
}


?>

